<?php 
$front_template = Zend_Registry::get('front_template');
if($this->view_datas['meta_keywords']){ $this->headMeta()->setName('keywords',$this->view_datas['meta_keywords']);	}
if($this->view_datas['meta_desc']){ $this->headMeta()->setName('description',$this->view_datas['meta_desc']); }
$this->headTitle()->headTitle($this->escape($this->view_datas['page_name']),'SET'); 


$allow_obj = new News_View_Helper_Allow();
if (!$allow_obj->allowRule('view',null,null,$this->group_datas['role_id'])) : ?>
	<?php echo $this->translator->translator('Member_Access_deny_desc'); ?>
<?php else : ?>

<script type="text/javascript">	
	$(function() {
		$('#pro_list').hide();
		$('a.toggle_pro').click(function() {
			var self = this;
			$('#pro_list').slideToggle(500,function () {
				var src = $(self).children("img").attr('src');
				var input = (src == 'application/layouts/scripts/<?php echo $front_template['theme_folder']; ?>/images/mod_img/minus.png') ? 'application/layouts/scripts/<?php echo $front_template['theme_folder']; ?>/images/mod_img/plus.png' : 'application/layouts/scripts/<?php echo $front_template['theme_folder']; ?>/images/mod_img/minus.png';
				$(self).children("img").attr('src',input);
			});
			return false;
		  });
	});
</script>

<div class="mod mod-news">
	<div class="news-icon">
        <h1><?php echo $this->escape($this->view_datas['page_name']); ?></h1>
    </div>
	<div class="clear">&nbsp;</div>

	<!-- Category Panel Start -->
    <?php
		if($this->groupInfo['category_panel'] == '1')
		{
			$categoryPanel = new News_View_Helper_CategoryPanel();				
	?>
	<div class="category-panel">
	<a href="javascript:void(0);" class="toggle_pro toggle-link"><img src="application/layouts/scripts/<?php echo $front_template['theme_folder']; ?>/images/mod_img/plus.png" border="0" /><div class="toggle"><?php echo $this->translator->translator('news_frontend_common_category_list_title'); ?></div></a>
	<div id="pro_list" class="clear">
            <?php echo $categoryPanel->getCategories('0',$this,$this->groupInfo['id'],null,$this->menu_id, $this->translator); ?>            
        </div>
    </div>
	<?php
		}
	?>
    <!-- Category Panel End -->

    <!-- News Info Start -->
    <div class="news-desc">
        <div class="mod-content">
            <div class="calendar">
                <div class="month"><?php echo date("M",strtotime($this->view_datas['page_date'])); ?></div>
                <h1><?php echo $this->numbers(date("d",strtotime($this->view_datas['page_date']))); ?></h1>
                <div class="year"><?php echo $this->numbers(date("Y",strtotime($this->view_datas['page_date']))); ?></div>
            </div>   		
            
            <h1><?php echo $this->escape($this->view_datas['page_name']); ?></h1>
            <div class="date"><?php echo $this->numbers($this->escape($this->view_datas['page_date'])); ?> <?php echo $this->translator->translator('news_frontend_posted_by_title'); ?> <?php echo $this->escape($this->view_datas['title'].' '.$this->view_datas['firstName'].' '.$this->view_datas['lastName']); ?></div>
            <div class="clear"><?php echo stripslashes($this->view_datas['page_desc']); ?></div>
        </div>
        
        <div class="clear">
            <!-- Getting All Comments from Comment Module and Add Comment Form -->
            <?php 
                $allCommentObj = new Comment_View_Helper_RepliedComment($this);
                echo $allCommentObj->getAllActiveComments('news_page',$this->escape($this->view_datas['id']));		
            ?>
            <!-- End of Getting All Comments from Comment Module Add Comment Form -->
        </div>
    </div>
    <!-- News Info End -->
</div>
<?php endif; ?>